package com.trust.controller;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.trust.agri.response.ResponseResult;
import com.trust.entity.Param.FarmCollectListParam;
import com.trust.entity.VO.FarmCollectListVO;
import com.trust.service.FarmCollectService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@Slf4j
@RequestMapping("/api/farm/collect")
@Api(value = "农事作业 - 采收作业", tags = "农事作业 - 采收作业")
public class FarmCollectController {

    @Resource
    private FarmCollectService service;

    @PostMapping("/list")
    @ApiOperation("采收列表")
    public ResponseResult<Page<FarmCollectListVO>> list(@RequestBody FarmCollectListParam param){
        Page<FarmCollectListVO> page = service.list(param);
        return ResponseResult.ok(page);
    }
}
